package demo
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.geom.Matrix;
	
	import res.GDI;
	
	public class Ball extends Sprite
	{
		[Embed(source="res/image2.png")]
		public static var ballClass:Class;
		
		private const d:int = 35;
		public function Ball()
		{
			super();
			var bm:Bitmap = new ballClass();
			var bmp:BitmapData = new BitmapData(d, d, true, 0x00000000);
			var m:Matrix = new Matrix();
			m.scale(d / bm.width, d / bm.height);
			bmp.draw(bm, m);
			GDI.drawBitmap(graphics, -d/2, -d/2, d, d, bmp);
			
//			graphics.beginFill(0xffffff);
//			graphics.drawRect(-15, -15, 30, 30);
		}
	}
}